<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <div class="datalist"><table id="flexigrid" style="display:none"></table></div>
        <script type="text/javascript">
            $(function() {
                $("#flexigrid").flexigrid($.extend(SG.flexOptions, {
                    url: '<?= site_url('logbattle/dueltop/flexigrid') ?>',
                    colModel: 
                    [
                        {display: '<?= translate('LOGFIGHT_ROLE_ONE_ID') ?>', name: 'one_role', width: '120'},
                        {display: '<?= translate('LOGFIGHT_ONE_PLATFORM_ID') ?>', name: 'one_platform', width: '20', hide:'true'},
                        {display: '<?= translate('LOGFIGHT_ONE_DITCH_ID') ?>', name: 'one_ditch', width: '30', hide:'true'},
                        {display: '<?= translate('LOGFIGHT_ONE_VERSION') ?>', name: 'one_version', width: '30', hide:'true'},
                        {display: '<?= translate('LOGFIGHT_ONE_SERVER_ID') ?>', name: 'one_server', width: '30'},
                        {display: '<?= translate('LOGFIGHT_ACCOUNT_ONE_ID') ?>', name: 'one_account', width: '120', hide:'true'},
                        
                        //{display: '<?= translate('LOGFIGHT_ROLE_ONE_NAME') ?>', name: 'player1.name', width: '120'},             
                        {display: '<?= translate('LOGFIGHT_ONE_IP_ADDRESS') ?>', name: 'one_ip', width: '120', hide:'true'},            
                        {display: '<?= translate('LOGFIGHT_ROLE_ONE_LEVEL') ?>', name: 'one_lv', width: '120'},
                        //{display: '<?= translate('LOGFIGHT_ROLE_ONE_RENCOUNTRE_LEVEL') ?>', name: 'role_one_rencountre_level', width: '120'}, 
                        {display: '<?= translate('LOGFIGHT_PROFESSION_ONE_TYPE') ?>', name: 'one_pro', width: '120', hide:'true'},

                        {display: '<?= translate('LOGFIGHT_ONE_P_SE') ?>', name: 'one_p_se', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_A_SE') ?>', name: 'one_a_se', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_P_S_ST') ?>', name: 'one_p_s_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_A_S_ST') ?>', name: 'one_a_s_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_P_T_ST') ?>', name: 'one_p_t_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_A_T_ST') ?>', name: 'one_a_t_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_P_T_SC') ?>', name: 'one_p_t_sc', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_A_T_SC') ?>', name: 'one_a_t_sc', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_RANK') ?>', name: 'one_rank', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_WIN_ST') ?>', name: 'one_win_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_WIN') ?>', name: 'one_win', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_GET_ST') ?>', name: 'one_get_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_ONE_GET_SC') ?>', name: 'one_get_sc', width: '120',},
                        
                        
                        {display: '<?= translate('LOGFIGHT_TWO_PLATFORM_ID') ?>', name: 'two_platform', width: '20', hide:'true'},
                        {display: '<?= translate('LOGFIGHT_TWO_DITCH_ID') ?>', name: 'two_ditch', width: '30', hide:'true'},
                        {display: '<?= translate('LOGFIGHT_TWO_VERSION') ?>', name: 'two_version', width: '30', hide:'true'},
                        {display: '<?= translate('LOGFIGHT_TWO_SERVER_ID') ?>', name: 'two_server', width: '30', hide:'true'},
                        {display: '<?= translate('LOGFIGHT_ACCOUNT_TWO_ID') ?>', name: 'two_account', width: '120'},
                        {display: '<?= translate('LOGFIGHT_ROLE_TWO_ID') ?>', name: 'two_role', width: '120'},
                        //{display: '<?= translate('LOGFIGHT_ROLE_TWO_NAME') ?>', name: 'player2.name', width: '120'},             
                        {display: '<?= translate('LOGFIGHT_TWO_IP_ADDRESS') ?>', name: 'two_ip', width: '120', hide:'true'},            
                        {display: '<?= translate('LOGFIGHT_ROLE_TWO_LEVEL') ?>', name: 'two_lv', width: '120', hide:'true'},
                        //{display: '<?= translate('LOGFIGHT_ROLE_TWO_RENCOUNTRE_LEVEL') ?>', name: 'role_two_rencountre_level', width: '120'}, 
                        {display: '<?= translate('LOGFIGHT_PROFESSION_TWO_TYPE') ?>', name: 'two_pro', width: '120', hide:'true'},   

                        {display: '<?= translate('LOGFIGHT_TWO_P_SE') ?>', name: 'two_p_se', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_A_SE') ?>', name: 'two_a_se', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_P_S_ST') ?>', name: 'two_p_s_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_A_S_ST') ?>', name: 'two_a_s_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_P_T_ST') ?>', name: 'two_p_t_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_A_T_ST') ?>', name: 'two_a_t_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_P_T_SC') ?>', name: 'two_p_t_sc', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_A_T_SC') ?>', name: 'two_a_t_sc', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_RANK') ?>', name: 'two_rank', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_WIN_ST') ?>', name: 'two_win_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_WIN') ?>', name: 'two_win', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_GET_ST') ?>', name: 'two_get_st', width: '120',},
                        {display: '<?= translate('LOGFIGHT_TWO_GET_SC') ?>', name: 'two_get_sc', width: '120',},

                        {display: '<?= translate('LOGFIGHT_COST_TIME') ?>', name: 'cost_time', width: '120'},    
                        {display: '<?= translate('LOGFIGHT_VICTORY_ROLE') ?>', name: 'victory', width: '120'},
                        {display: '<?= translate('LOGFIGHT_SURRENDER_ROLE') ?>', name: 'surrender', width: '120'},
                        {display: '<?= translate('LOGFIGHT_ONE_DIS') ?>', name: 'one_dis', width: '120'},
                        {display: '<?= translate('LOGFIGHT_TWO_DIS') ?>', name: 'two_dis', width: '120'},
                        {display: '<?= translate('LOGFIGHT_ONEPOWER') ?>', name: 'one_power', width: '120'},
                        {display: '<?= translate('LOGFIGHT_TWOPOWER') ?>', name: 'two_power', width: '120'},
                        {display: '<?= translate('LOGFIGHT_ENTRY_TIME') ?>', name: 'entry_time', width: '120'},
                        {display: '<?= translate('LOGFIGHT_OPERATION_TIME') ?>', name: 'operation_time', width: '120'},
                    ],
		    		buttons: [ {separator: true},],
                }));

                function formatUrl(value, id, cell) {
                    if (cell[0] == cell[1]) {
                        return "<a href='" + value + "' target='_blank'><?= translate('MANAGE') ?></a>";
                    } else {
                        return "<?= translate('NONE') ?>";
                    }
                }

                function formatAreaState(value, id, cell, field) {
                    var typearr = <?= json_encode($statelist); ?>;
                    var arr = [];
                    
                    $.each(typearr, function(i, j) {
                        var color = i == 'hide' ? 'gray' : (i == 'new' ? 'red' : (i == 'prepare' ? 'green' : (i == 'close' ? 'gray' : '')))
                        arr.push({color: color, text: j, value: i});
                    });
                    return filterGeneral(arr, value, field);
                }
                
                function formatAreaFlag(value, id, cell, field) {
                    var typearr = <?= json_encode($flaglist); ?>;
                    var arr = [];
                    
                    $.each(typearr, function(i, j) {
                        var color = i == 'hide' ? 'gray' : (i == 'new' ? 'red' : (i == 'prepare' ? 'green' : (i == 'close' ? 'gray' : '')))
                        arr.push({color: color, text: j, value: i});
                    });
                    return filterGeneral(arr, value, field);
                }
            });
        </script>
    </body>
</html>